//
//  ViewController.m
//  project-A (pianke)
//
//  Created by dllo on 16/1/24.
//  Copyright © 2016年 scott. All rights reserved.
//

#import "ViewController.h"
#import "Picture.h"
#import "firstViewConrtoller.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
   self.edgesForExtendedLayout = UIRectEdgeNone;
    self.view.backgroundColor = [UIColor blackColor];
    [self creatPicture];
    
    self.navigationController.navigationBarHidden = YES;
    
    self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent;
    self.navigationController.navigationBar.backgroundColor = [UIColor whiteColor];
    
    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
    
   }

-(void)creatPicture{
    
    Picture  *pic = [[Picture alloc]initWithFrame:[UIScreen mainScreen].bounds images:@[@"1",@"2",@"3",@"4",@"5"]];
    
    [pic.button addTarget:self action:@selector(buttonAction) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:pic];
    [pic release];
  }

-(void)buttonAction{
    
    NSLog(@"asasdd");
    
    firstViewConrtoller *vc = [[firstViewConrtoller alloc]init];
    
    [self.navigationController pushViewController:vc animated:YES];
    [vc release];
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
